#ifndef KPEXT_CTX_GLOBAL_H
#define KPEXT_CTX_GLOBAL_H

#include "gtest/gtest.h"
#include "kpextVkContext.h"
#include "KpExtGP.h"

using  chronoms =  std::chrono::milliseconds;

void msleep(int ms){
    std::this_thread::sleep_for(
                chronoms(ms)
                );
}

class KpExtCtxEnv : public ::testing::Environment {

    // Environment interface
public:
    ~KpExtCtxEnv() override{}
    void SetUp() override{
        GvkContextPtr = new kpextVkContext();
        ASSERT_NE(nullptr, GvkContextPtr);
        ASSERT_EQ(true, GvkContextPtr->getIsVkContextOk());
    }

    void TearDown() override{
        ASSERT_NE(nullptr, GvkContextPtr);
        delete GvkContextPtr;
        GvkContextPtr = nullptr;
        ASSERT_EQ(true, GvkContextPtr->destroyInstance());
    }
}; // class KpExtCtxEnv



#endif // KPEXT_CTX_GLOBAL_H
